﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using com.iss.inventory.Entity;

namespace Staionery_Inventory.Presentation.Reports
{
    public partial class Inventory_statusReport1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["empID"] == null)
            {
                Response.Redirect("~/Presentation/login.aspx");
            }

            Label lbl = this.Master.FindControl("lblLogInName") as Label;
            if (lbl != null)
            {
                lbl.Text = Session["UserName"].ToString();
            }

            Time.Text = Convert.ToString(DateTime.Now.Date);

            List<object> list = new List<object>();
            InvManagementEntities inventent = new InvManagementEntities();

            var t = from inv in inventent.StationeryItems select new { inv.ItemID, inv.Description, inv.QtyLeft, inv.ReorderLevel, inv.ReorderQty, inv.Location, inv.UnitofMeasure };
            list = t.ToList<object>();
            GridView1.DataSource = list;
            GridView1.DataBind();
        }
    }
}